#include "tinycthread.h"
#include <queue>
using namespace std;

class Concurrent_queue
{
private:
	std::queue<thrd_t> the_queue;
	mtx_t the_mutex;
	cnd_t the_condition_variable;
public:
	Concurrent_queue();
	~Concurrent_queue();

	void push(thrd_t const& data);

	bool empty();

	bool try_pop(thrd_t& popped_value);

	void wait_and_pop(thrd_t& popped_value);

};